package ofood.food.scheduled.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Statistics of the total number of new foods added today
 */
@Component
public class FoodScheduled {
    private Logger logger= LoggerFactory.getLogger(this.getClass());

    @Scheduled(cron = "0 0 0 * * ?")
    public void todayAddedFood(){
        System.out.println("begin......");

        logger.error("today added food");
    }
}
